package com.sc.gateway.dto;

import lombok.Data;

@Data
public class ResultDTO {
    private Integer code;
    private String message;
    private Object data;

    public ResultDTO(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResultDTO(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static ResultDTO success(Object t) {
        return new ResultDTO(200,"",t);
    }

    public static ResultDTO err(String message) {
        return new ResultDTO(500,message,null);
    }

    public ResultDTO() {

    }

}
